{% extends "todo/base.html" %}
{% load url from future %}

{% block title %}{{ list_title }} Todo Lists{% endblock %}

{% block content %}

   <h1>Todo Lists</h1>

   <p>{{ item_count }} items in {{ list_count }} lists</p>

   	{% regroup list_list by group as section_list %}

    {% for group in section_list %}
        <h3>{{ group.grouper }}</h3>
        <ul>
            {% for item in group.list %}
   	            <li><a class="todo" href="{% url 'todo-incomplete_tasks' item.id item.slug %}">{{ item.name }} </a> ({{ item.incomplete_tasks.count }}/{{ item.item_set.count }})</li>
            {% endfor %}
        </ul>
    {% endfor %}

    <p><a href="{% url 'todo-add_list' %}">Create new todo list</a></p>

{% endblock %}
